﻿// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)

// Unlit shader. Simplest possible textured shader.
// - no lighting
// - no lightmap support
// - no per-material color

Shader "Unlit/VertexColor" {
Properties {
}

SubShader {
	Tags { "RenderType"="Transparent"  "Queue" = "Transparent"}

	Blend SrcAlpha OneMinusSrcAlpha 

	Pass {  
			CGPROGRAM

			#pragma vertex vert
			#pragma fragment frag
			#pragma target 2.0
			#pragma multi_compile_fog
			
			#include "UnityCG.cginc"

			struct appdata_t {
				float4 vertex : POSITION;
				float4 color :COLOR;
			};

			struct v2f {
				float4 vertex : SV_POSITION;
				float4 color :COLOR;
			};


			v2f vert (appdata_t v)
			{
				v2f o;
				o.vertex = UnityObjectToClipPos(v.vertex);
				o.color = v.color;
				return o;
			}
			
			fixed4 frag (v2f i) : SV_Target
			{
                fixed4 col = i.color;			
//				col.a = 0.5f;
//				UNITY_OPAQUE_ALPHA(col.a);
				return col;
			}
		ENDCG
	}
}

}
